<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>计算器</title>
	</head>
	<body>
		<div>
			<input id="input" />
			<button id="=">=</button>
		</div>
		<script>
			var input=document.getElementById("input");
			var eq=document.getElementById("=");
			eq.onclick=function(){
				// alert(input.value);
				var sum=eval(input.value);
				alert(sum);
			}
			
			
			
		</script>
		
		
	</body>
</html>
